using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Data.Common;
using System.Globalization;
using OracleInternal.Common;

namespace Oracle.ManagedDataAccess.Client
{
	[DefaultProperty("DataSource")]
	public sealed class OracleConnectionStringBuilder : DbConnectionStringBuilder
	{
		private Dictionary<string, object> KeyValuePairList;

		private static Hashtable m_boolMapping;

		private static Hashtable m_defaultValues;

		[DisplayName("Proxy User")]
		public string ProxyUserId
		{
			get
			{
				return (string)KeyValuePairList["PROXY USER ID"];
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				SetValueToBaseAndList("PROXY USER ID", value);
			}
		}

		[DisplayName("Proxy Password")]
		public string ProxyPassword
		{
			get
			{
				return (string)KeyValuePairList["PROXY PASSWORD"];
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				SetValueToBaseAndList("PROXY PASSWORD", value);
			}
		}

		[DisplayName("DBA Privilege")]
		public string DBAPrivilege
		{
			get
			{
				return (string)KeyValuePairList["DBA PRIVILEGE"];
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				if (value.ToUpperInvariant() != "SYSDBA" && value.ToUpperInvariant() != "SYSOPER" && value.ToUpperInvariant() != "SYSASM" && value.ToUpperInvariant() != "SYSBACKUP" && value.ToUpperInvariant() != "SYSDG" && value.ToUpperInvariant() != "SYSKM" && value.ToUpperInvariant() != "SYSRAC" && value != string.Empty)
				{
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "DBA Privilege", value));
				}
				SetValueToBaseAndList("DBA PRIVILEGE", value);
			}
		}

		[DisplayName("User ID")]
		public string UserID
		{
			get
			{
				return (string)KeyValuePairList["USER ID"];
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				SetValueToBaseAndList("USER ID", value);
			}
		}

		[DisplayName("Data Source")]
		public string DataSource
		{
			get
			{
				return (string)KeyValuePairList["DATA SOURCE"];
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				SetValueToBaseAndList("DATA SOURCE", value);
			}
		}

		[DisplayName("Password")]
		[PasswordPropertyText(true)]
		public string Password
		{
			get
			{
				return (string)KeyValuePairList["PASSWORD"];
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				SetValueToBaseAndList("PASSWORD", value);
			}
		}

		[DisplayName("Max Pool Size")]
		public int MaxPoolSize
		{
			get
			{
				return (int)KeyValuePairList["MAX POOL SIZE"];
			}
			set
			{
				if (value < 1)
				{
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Max Pool Size", value.ToString()));
				}
				SetValueToBaseAndList("MAX POOL SIZE", value);
			}
		}

		[DisplayName("Min Pool Size")]
		public int MinPoolSize
		{
			get
			{
				return (int)KeyValuePairList["MIN POOL SIZE"];
			}
			set
			{
				if (value < 0)
				{
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Min Pool Size", value.ToString()));
				}
				SetValueToBaseAndList("MIN POOL SIZE", value);
			}
		}

		[DisplayName("Increment pool size")]
		public int IncrPoolSize
		{
			get
			{
				return (int)KeyValuePairList["INCR POOL SIZE"];
			}
			set
			{
				if (value < 1)
				{
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Increment Pool Size", value.ToString()));
				}
				SetValueToBaseAndList("INCR POOL SIZE", value);
			}
		}

		[DisplayName("Decrement pool size")]
		public int DecrPoolSize
		{
			get
			{
				return (int)KeyValuePairList["DECR POOL SIZE"];
			}
			set
			{
				if (value < 1)
				{
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Decrement Pool Size", value.ToString()));
				}
				SetValueToBaseAndList("DECR POOL SIZE", value);
			}
		}

		[DisplayName("Connection Life Time")]
		public int ConnectionLifeTime
		{
			get
			{
				return (int)KeyValuePairList["CONNECTION LIFETIME"];
			}
			set
			{
				if (value < 0)
				{
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Connection Life Time", value.ToString()));
				}
				SetValueToBaseAndList("CONNECTION LIFETIME", value);
			}
		}

		[DisplayName("Statement Cache Size")]
		public int StatementCacheSize
		{
			get
			{
				return (int)KeyValuePairList["STATEMENT CACHE SIZE"];
			}
			set
			{
				if (value < 0)
				{
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Statement Cache Size", value.ToString()));
				}
				SetValueToBaseAndList("STATEMENT CACHE SIZE", value);
			}
		}

		[DisplayName("Self Tuning")]
		public bool SelfTuning
		{
			get
			{
				return (bool)KeyValuePairList["SELF TUNING"];
			}
			set
			{
				SetValueToBaseAndList("SELF TUNING", value);
			}
		}

		[DisplayName("Connection Timeout")]
		public int ConnectionTimeout
		{
			get
			{
				return (int)KeyValuePairList["CONNECTION TIMEOUT"];
			}
			set
			{
				if (value < 0)
				{
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Connection Timeout", value.ToString()));
				}
				SetValueToBaseAndList("CONNECTION TIMEOUT", value);
			}
		}

		[DisplayName("Persist Security Info")]
		public bool PersistSecurityInfo
		{
			get
			{
				return (bool)KeyValuePairList["PERSIST SECURITY INFO"];
			}
			set
			{
				SetValueToBaseAndList("PERSIST SECURITY INFO", value);
			}
		}

		[DisplayName("Enlist")]
		public string Enlist
		{
			get
			{
				return (string)KeyValuePairList["ENLIST"];
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				if (value.ToLowerInvariant() != "dynamic" && !m_boolMapping.ContainsKey(value.ToLowerInvariant()))
				{
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Enlist", value));
				}
				SetValueToBaseAndList("ENLIST", value.ToLowerInvariant());
			}
		}

		[DisplayName("metadata pooling")]
		public bool MetadataPooling
		{
			get
			{
				return (bool)KeyValuePairList["METADATA POOLING"];
			}
			set
			{
				SetValueToBaseAndList("METADATA POOLING", value);
			}
		}

		[DisplayName("Pooling")]
		public bool Pooling
		{
			get
			{
				return (bool)KeyValuePairList["POOLING"];
			}
			set
			{
				SetValueToBaseAndList("POOLING", value);
			}
		}

		[DisplayName("Validate Connection")]
		public bool ValidateConnection
		{
			get
			{
				return (bool)KeyValuePairList["VALIDATE CONNECTION"];
			}
			set
			{
				SetValueToBaseAndList("VALIDATE CONNECTION", value);
			}
		}

		[DisplayName("Statement Cache Purge")]
		public bool StatementCachePurge
		{
			get
			{
				return (bool)KeyValuePairList["STATEMENT CACHE PURGE"];
			}
			set
			{
				SetValueToBaseAndList("STATEMENT CACHE PURGE", value);
			}
		}

		[DisplayName("HAEvents")]
		public bool HAEvents
		{
			get
			{
				return (bool)KeyValuePairList["HA EVENTS"];
			}
			set
			{
				SetValueToBaseAndList("HA EVENTS", value);
			}
		}

		[DisplayName("Load Balancing")]
		public bool LoadBalancing
		{
			get
			{
				return (bool)KeyValuePairList["LOAD BALANCING"];
			}
			set
			{
				SetValueToBaseAndList("LOAD BALANCING", value);
			}
		}

		[DisplayName("Context Connection")]
		public bool ContextConnection
		{
			get
			{
				return (bool)KeyValuePairList["CONTEXT CONNECTION"];
			}
			set
			{
				SetValueToBaseAndList("CONTEXT CONNECTION", value);
			}
		}

		[DisplayName("PromotableTransaction")]
		public string PromotableTransaction
		{
			get
			{
				return (string)KeyValuePairList["PROMOTABLE TRANSACTION"];
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				SetValueToBaseAndList("PROMOTABLE TRANSACTION", value);
			}
		}

		[DisplayName("TnsAdmin")]
		public string TnsAdmin
		{
			get
			{
				return (string)KeyValuePairList["TNS_ADMIN"];
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				SetValueToBaseAndList("TNS_ADMIN", value);
			}
		}

		[DisplayName("WalletLocation")]
		public string WalletLocation
		{
			get
			{
				return (string)KeyValuePairList["WALLET_LOCATION"];
			}
			set
			{
				if (value == null)
				{
					throw new ArgumentNullException();
				}
				SetValueToBaseAndList("WALLET_LOCATION", value);
			}
		}

		public override bool IsFixedSize => true;

		public override ICollection Keys
		{
			get
			{
				Dictionary<string, object>.KeyCollection keys = KeyValuePairList.Keys;
				string[] array = new string[((ICollection<string>)keys).Count];
				((ICollection<string>)keys).CopyTo(array, 0);
				return new ReadOnlyCollection<string>(array);
			}
		}

		public override ICollection Values
		{
			get
			{
				ICollection<string> obj = (ICollection<string>)Keys;
				IEnumerator<string> enumerator = obj.GetEnumerator();
				object[] array = new object[obj.Count];
				for (int i = 0; i < array.Length; i++)
				{
					enumerator.MoveNext();
					array[i] = this[enumerator.Current];
				}
				return new ReadOnlyCollection<object>(array);
			}
		}

		public override object this[string keyword]
		{
			get
			{
				if (keyword == null)
				{
					throw new ArgumentNullException();
				}
				return KeyValuePairList[keyword.ToUpperInvariant()];
			}
			set
			{
				if (keyword == null)
				{
					throw new ArgumentNullException();
				}
				if (value == null)
				{
					Remove(keyword);
				}
				else
				{
					SetProperty(keyword, value);
				}
			}
		}

		static OracleConnectionStringBuilder()
		{
			m_boolMapping = new Hashtable(4);
			m_boolMapping["true"] = true;
			m_boolMapping["false"] = false;
			m_boolMapping["yes"] = true;
			m_boolMapping["no"] = false;
			m_defaultValues = new Hashtable();
			m_defaultValues.Add("USER ID", "");
			m_defaultValues.Add("PASSWORD", "");
			m_defaultValues.Add("PROXY USER ID", "");
			m_defaultValues.Add("PROXY PASSWORD", "");
			m_defaultValues.Add("DATA SOURCE", "");
			m_defaultValues.Add("DBA PRIVILEGE", "");
			m_defaultValues.Add("TNS_ADMIN", "");
			m_defaultValues.Add("WALLET_LOCATION", "");
			m_defaultValues.Add("PROMOTABLE TRANSACTION", "promotable");
			m_defaultValues.Add("CONNECTION LIFETIME", 0);
			m_defaultValues.Add("INCR POOL SIZE", 5);
			m_defaultValues.Add("DECR POOL SIZE", 1);
			m_defaultValues.Add("MAX POOL SIZE", 100);
			m_defaultValues.Add("MIN POOL SIZE", 1);
			m_defaultValues.Add("STATEMENT CACHE SIZE", 0);
			m_defaultValues.Add("CONNECTION TIMEOUT", 15);
			m_defaultValues.Add("ENLIST", "true");
			m_defaultValues.Add("POOLING", true);
			m_defaultValues.Add("VALIDATE CONNECTION", false);
			m_defaultValues.Add("STATEMENT CACHE PURGE", false);
			m_defaultValues.Add("PERSIST SECURITY INFO", false);
			m_defaultValues.Add("HA EVENTS", false);
			m_defaultValues.Add("LOAD BALANCING", false);
			m_defaultValues.Add("CONTEXT CONNECTION", false);
			m_defaultValues.Add("METADATA POOLING", true);
			m_defaultValues.Add("SELF TUNING", ConfigBaseClass.m_SelfTuning);
		}

		private void SetProperty(string keyword, object value)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Entry, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.SetProperty);
			}
			try
			{
				int num = 0;
				string text = keyword.ToUpperInvariant();
				switch (text)
				{
				case "USER ID":
					UserID = value.ToString();
					break;
				case "PASSWORD":
					Password = value.ToString();
					break;
				case "DATA SOURCE":
					DataSource = value.ToString();
					break;
				case "DBA PRIVILEGE":
					DBAPrivilege = value.ToString();
					break;
				case "PROXY USER ID":
					ProxyUserId = value.ToString();
					break;
				case "PROXY PASSWORD":
					ProxyPassword = Convert.ToString(value);
					break;
				case "PROMOTABLE TRANSACTION":
					PromotableTransaction = Convert.ToString(value);
					break;
				case "ENLIST":
					Enlist = value.ToString();
					break;
				case "MIN POOL SIZE":
					try
					{
						num = int.Parse(value.ToString(), NumberStyles.None);
					}
					catch
					{
						throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Min Pool Size", value.ToString()));
					}
					MinPoolSize = num;
					break;
				case "MAX POOL SIZE":
					try
					{
						num = int.Parse(value.ToString(), NumberStyles.None);
					}
					catch
					{
						throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Max Pool Size", value.ToString()));
					}
					MaxPoolSize = num;
					break;
				case "CONNECTION LIFETIME":
					try
					{
						num = int.Parse(value.ToString(), NumberStyles.None);
					}
					catch
					{
						throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Connection Lifetime", value.ToString()));
					}
					ConnectionLifeTime = num;
					break;
				case "CONNECTION TIMEOUT":
				case "CONNECT TIMEOUT":
					try
					{
						num = int.Parse(value.ToString(), NumberStyles.None);
					}
					catch
					{
						throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Connection Timeout", value.ToString()));
					}
					ConnectionTimeout = num;
					break;
				case "INCR POOL SIZE":
					try
					{
						num = int.Parse(value.ToString(), NumberStyles.None);
					}
					catch
					{
						throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Incr Pool Size", value.ToString()));
					}
					IncrPoolSize = num;
					break;
				case "DECR POOL SIZE":
					try
					{
						num = int.Parse(value.ToString(), NumberStyles.None);
					}
					catch
					{
						throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Decr Pool Size", value.ToString()));
					}
					DecrPoolSize = num;
					break;
				case "STATEMENT CACHE SIZE":
					try
					{
						num = int.Parse(value.ToString(), NumberStyles.None);
					}
					catch
					{
						throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Statement Cache Size", value.ToString()));
					}
					StatementCacheSize = num;
					break;
				case "PERSIST SECURITY INFO":
				{
					string key = value.ToString()!.ToLowerInvariant();
					if (m_boolMapping.ContainsKey(key))
					{
						PersistSecurityInfo = (bool)m_boolMapping[key];
						break;
					}
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Persist Security Info", key));
				}
				case "POOLING":
				{
					string key = value.ToString()!.ToLowerInvariant();
					if (m_boolMapping.ContainsKey(key))
					{
						Pooling = (bool)m_boolMapping[key];
						break;
					}
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Pooling", key));
				}
				case "VALIDATE CONNECTION":
				{
					string key = value.ToString()!.ToLowerInvariant();
					if (m_boolMapping.ContainsKey(key))
					{
						ValidateConnection = (bool)m_boolMapping[key];
						break;
					}
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "validate connection", key));
				}
				case "STATEMENT CACHE PURGE":
				{
					string key = value.ToString()!.ToLowerInvariant();
					if (m_boolMapping.ContainsKey(key))
					{
						StatementCachePurge = (bool)m_boolMapping[key];
						break;
					}
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Statement Cache Purge", key));
				}
				case "HA EVENTS":
				{
					string key = value.ToString()!.ToLowerInvariant();
					if (m_boolMapping.ContainsKey(key))
					{
						HAEvents = (bool)m_boolMapping[key];
						break;
					}
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "HA events", key));
				}
				case "LOAD BALANCING":
				{
					string key = value.ToString()!.ToLowerInvariant();
					if (m_boolMapping.ContainsKey(key))
					{
						LoadBalancing = (bool)m_boolMapping[key];
						break;
					}
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "load balancing", key));
				}
				case "CONTEXT CONNECTION":
				{
					string key = value.ToString()!.ToLowerInvariant();
					if (m_boolMapping.ContainsKey(key))
					{
						ContextConnection = (bool)m_boolMapping[key];
						break;
					}
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Context Connection", key));
				}
				case "METADATA POOLING":
				{
					string key = value.ToString()!.ToLowerInvariant();
					if (m_boolMapping.ContainsKey(key))
					{
						MetadataPooling = (bool)m_boolMapping[key];
						break;
					}
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "metadata pooling", key));
				}
				case "SELF TUNING":
				{
					string key = value.ToString()!.ToLowerInvariant();
					if (m_boolMapping.ContainsKey(key))
					{
						SelfTuning = (bool)m_boolMapping[key];
						break;
					}
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_VALUE, "Self Tuning", value.ToString()));
				}
				case "TNS_ADMIN":
					TnsAdmin = value.ToString();
					break;
				case "WALLET_LOCATION":
					WalletLocation = value.ToString();
					break;
				default:
					throw new OracleException(ResourceStringConstants.CON_STR_INVALID_VALUE, string.Empty, string.Empty, OracleStringResourceManager.GetErrorMesg(ResourceStringConstants.CON_STR_INVALID_ATTRIB, text));
				}
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPrivate)
				{
					Trace.Write(OracleTraceLevel.Private, OracleTraceTag.Exit, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.SetProperty);
				}
			}
		}

		private void ResetValues()
		{
			foreach (string key in m_defaultValues.Keys)
			{
				KeyValuePairList[key] = m_defaultValues[key];
			}
		}

		private void Initialize()
		{
			KeyValuePairList = new Dictionary<string, object>();
			IDictionaryEnumerator enumerator = m_defaultValues.GetEnumerator();
			while (enumerator.MoveNext())
			{
				KeyValuePairList.Add(enumerator.Key as string, enumerator.Value);
			}
		}

		private void SetValueToBaseAndList(string keyword, object value)
		{
			base[keyword] = value;
			KeyValuePairList[keyword] = value;
		}

		public OracleConnectionStringBuilder()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.ctor);
			}
			try
			{
				Initialize();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.ctor);
				}
			}
		}

		public OracleConnectionStringBuilder(string connectionString)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.ctor);
			}
			try
			{
				if (connectionString == null)
				{
					throw new ArgumentNullException();
				}
				Initialize();
				base.ConnectionString = connectionString;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.ctor, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.ctor);
				}
			}
		}

		public override void Clear()
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.Clear);
			}
			try
			{
				base.Clear();
				ResetValues();
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.Clear, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.Clear);
				}
			}
		}

		public override bool ContainsKey(string keyword)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.ContainsKey);
			}
			try
			{
				if (keyword == null)
				{
					throw new ArgumentNullException();
				}
				return KeyValuePairList.ContainsKey(keyword.ToUpperInvariant());
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.ContainsKey, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.ContainsKey);
				}
			}
		}

		public override bool Remove(string keyword)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.Remove);
			}
			try
			{
				if (keyword == null)
				{
					throw new ArgumentNullException();
				}
				string text = keyword.ToUpperInvariant();
				if (base.Remove(text))
				{
					KeyValuePairList[text] = m_defaultValues[text];
					return true;
				}
				return false;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.Remove, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.Remove);
				}
			}
		}

		public override bool TryGetValue(string keyword, out object value)
		{
			if (ProviderConfig.m_bTraceLevelPublic)
			{
				Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Entry, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.TryGetValue);
			}
			try
			{
				if (keyword == null)
				{
					throw new ArgumentNullException();
				}
				string text = keyword.ToUpperInvariant();
				if (ContainsKey(text))
				{
					value = KeyValuePairList[text];
					return true;
				}
				value = null;
				return false;
			}
			catch (Exception ex)
			{
				OracleException.HandleError(OracleTraceLevel.Public, OracleTraceTag.Error, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.TryGetValue, ex);
				throw;
			}
			finally
			{
				if (ProviderConfig.m_bTraceLevelPublic)
				{
					Trace.Write(OracleTraceLevel.Public, OracleTraceTag.Exit, OracleTraceClassName.OracleConnectionStringBuilder, OracleTraceFuncName.TryGetValue);
				}
			}
		}

		protected override void GetProperties(Hashtable propertyDescriptors)
		{
			base.GetProperties(propertyDescriptors);
		}
	}
}
